﻿@model DynamicLinqWebDocs.Infrastructure.Data.IDataRepo

@{
    ViewBag.Title = "Expressions";
}

<h2>@ViewBag.Title</h2>


<h3>Expression Methods</h3>
@Html.FormatMarkdown("Expression methods are functions that are used inside a *string expression*.  These expression methods are not to be confused with the standard static methods provided by `DynamicQueryable` and other similiar static classes.")

<table class="table">
    <thead>
        <tr>
            <th>Expression</th>
            <th>Description</th>
        </tr>
    </thead>
    <tbody>
        @foreach (var exp in Model.GetExpressions().OrderBy(x => x.Name))
        {
            <tr>
                <td>@Html.ActionLink(exp.Name, "Expression", "Expression", new { expressionName = exp.Name }, null)</td>
                <td>@Html.FormatMarkdown(exp.Description)</td>
            </tr>
        }
    </tbody>
</table>

<h3>Expression Keywords</h3>
@Html.FormatMarkdown("Expression keywords are used inside *string expressions*.")

<table class="table">
    <thead>
        <tr>
            <th>Keyword</th>
            <th>Description</th>
        </tr>
    </thead>
    <tbody>
        @foreach (var keyword in Model.GetKeywords().OrderBy(x => x.Name))
        {
            <tr>
                <td>@Html.ActionLink(keyword.Name, "Keyword", "Expression", new { keywordName = keyword.Name }, null)</td>
                <td>@Html.FormatMarkdown(keyword.Description)</td>
            </tr>
        }
    </tbody>
</table>
